package tianrun.ziguan.api.calculate.config.dao.common;

import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import tianrun.ziguan.api.calculate.config.dto.request.common.add.edit.SaveBody;
import tianrun.ziguan.api.calculate.config.dto.request.common.add.edit.QueryBody;

import java.io.Serializable;
import java.util.List;
import java.util.Map;
import java.util.Set;
@Mapper
public interface CommonMapper {

    void add(@Param("body") SaveBody saveBody);

    void edit(@Param("body") SaveBody saveBody);

    void delete(@Param("tableName") String tableName, @Param("key") String key, @Param("ids") Set<? extends Serializable> ids);

    List<Map<String, Object>> list(@Param("body") QueryBody body);

    IPage<Map<String, Object>> page(IPage<Map<String, Object>> page, @Param("body") QueryBody body);

    Map<String, Object> select(@Param("tableName") String tableName, @Param("key") String key, @Param("id") Long id);


}
